<%@ page import="com.dingpeikeji.quickdeer.modules.rentproduct.entity.TDemands" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<c:set var="REACTSTATUS_WAIT" value="<%=TDemands.REACTSTATUS_WAIT %>" />
<c:set var="REACTSTATUS_DONE" value="<%=TDemands.REACTSTATUS_DONE %>" />
<c:set var="REACTSTATUS_SURE" value="<%=TDemands.REACTSTATUS_SURE %>" />
<c:set var="REACTSTATUS_CANCEL" value="<%=TDemands.REACTSTATUS_CANCEL %>" />
<html>
<head>
<title>定制包车</title>
<link href="${ctxStatic }/xiake/css/list.css" rel='stylesheet'type='text/css' />
<link href="${ctxStatic }/xiake/css/style.css" rel='stylesheet'type='text/css' />
<script src="${ctxStatic}/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body>
	<input type="hidden" id="menuInfo" value="indexDemands">
	<div class="container font_normal_size"> 
		<div class="container_con">
			<form id="searchForm" action="${ctx }/rentproduct/demands" method="get">
				<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
				<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
				<div class="order_table_p" style="position: relative;padding-top:10px"> 
					<label>起始日期&nbsp;&nbsp;</label>
					<input type="text" id="createDateQueryStart" name="createDateQueryStart" maxlength="20" readonly class="order_table_s Wdate"
						value="${tDemands.createDateQueryStart }"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,maxDate:'#F{$dp.$D(\'createDateQueryEnd\')}'});"/>
					 - <input type="text" id="createDateQueryEnd" name="createDateQueryEnd" maxlength="20" readonly class="order_table_s Wdate"
						value="${tDemands.createDateQueryEnd }"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,minDate:'#F{$dp.$D(\'createDateQueryStart\')}'});"/>
					<label style="width: 80px;">反馈状态&nbsp;&nbsp;</label>
					<select name="reactstatus" style="width:100px;border:1px solid #999;">
						<option value="">全部</option>
						<option value="${REACTSTATUS_WAIT }" ${tDemands.reactstatus==REACTSTATUS_WAIT?'selected':'' }>待响应</option>
						<option value="${REACTSTATUS_SURE }" ${tDemands.reactstatus==REACTSTATUS_SURE?'selected':'' }>已响应</option>
						<option value="${REACTSTATUS_DONE }" ${tDemands.reactstatus==REACTSTATUS_DONE?'selected':'' }>已支付</option>
						<option value="${REACTSTATUS_CANCEL }" ${tDemands.reactstatus==REACTSTATUS_CANCEL?'selected':'' }>已取消</option>
					</select>
					<div class="order_table_z pointer" style="margin-left: 20px;" onclick="$('#searchForm').submit();">查询</div>
				</div>
			</form>
			<div class="order_table" style="margin: 0">
				<table>
					<tr>
						<th>发布时间</th>
						<th>车型</th>
						<th>包车数量</th>
						<th>用车时间</th>
						<th>包车天数</th>
						<th>出发地</th>
						<th>目的地</th>
						<th>反馈状态</th>
						<th>操作</th>
					</tr>
					<c:if test="${not empty page.list }">
					<c:forEach items="${page.list}" var="tDemands">
						<tr>
							<td class="order_table_td"><fmt:formatDate value="${tDemands.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
							<td class="order_table_td">${tDemands.cartype.typename}</td>
							<td class="order_table_td">${tDemands.vehiclenum}</td>
							<td class="order_table_td"><fmt:formatDate value="${tDemands.fromdate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
							<td class="order_table_td">${tDemands.rentdays}</td>
							<td class="order_table_td">${tDemands.departcity.sitename}</td>
							<td class="order_table_td">${tDemands.destcity.sitename}</td>
							<td class="order_table_td">
								${tDemands.reactstatus==REACTSTATUS_WAIT?'待响应':'' }
								${tDemands.reactstatus==REACTSTATUS_DONE?'已支付':'' }
								<c:if test="${tDemands.reactstatus==REACTSTATUS_SURE }">
									<span class="red">已响应
										<c:if test="${not empty tDemands.rectcount }">
											<span>(${tDemands.rectcount })</span>
										</c:if>
									</span>
								</c:if>
								${tDemands.reactstatus==REACTSTATUS_CANCEL?'已取消':'' }
							</td>
							<td>
								<div>
									<a href="${ctx }/rentproduct/demands/sys_form?demandid=${tDemands.demandid}" class="container_table_y2 pointer">查看</a>
									<c:if test="${tDemands.reactstatus ne REACTSTATUS_CANCEL and tDemands.reactstatus ne REACTSTATUS_DONE }">
										<a href="${ctx }/rentproduct/demands/cancel?demandid=${tDemands.demandid}" class="container_table_y2 pointer">取消</a>
									</c:if>
								</div>
							</td>
						</tr>
					</c:forEach>
					</c:if>
					<c:if test="${ empty page.list }">
						<tr>
							<td class="order_table_td"><h1><font color="#8B5F65">未查询到定制包车</font></h1></td>
							<td class="order_table_td"></td>
							<td class="order_table_td"></td>
							<td class="order_table_td"></td>
							<td class="order_table_td"></td>
							<td class="order_table_td"></td>
							<td class="order_table_td"></td>
							<td class="order_table_td">
							</td>
							<td>
							</td>
						</tr>
					</c:if>
				</table>
			</div>
		</div>
	</div>
</body>
</html>